package humans;

import java.util.Observable;
import java.util.Observer;

import duck.ObservedQuack;

public class Quackologist implements Observer {
	private static Quackologist instance = null;
	public static Quackologist getInstance() {
		if(instance==null) instance = new Quackologist();
		return instance;
	}
	private Quackologist() {
		
	}
	
	@Override
	public void update(Observable o, Object arg) {
		ObservedQuack q = (ObservedQuack) o;
		System.out.println("Quackologist > duck heard from a "+q.getQuackable().getClass().getName());
	}

}
